package myTheard;

public class ThreadName extends Thread {

    int i = 0;

    String name;

    public ThreadName(String name) {
        this.name = name;
    }

    @Override
    public void run() {

        while (true){
            System.out.println(name+""+Thread.currentThread()+"i="+i);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            i++;
        }
    }
}
